import React from 'react';
import {SearchBar} from 'antd-mobile';
import {observer,inject} from 'mobx-react';
import '@/style/Home.less';

@inject('store')
@observer
class Home extends React.Component{
  async componentDidMount() {
    await this.props.store.myTest();
  }
  render(){
    console.log(this.props.store);
    const {title} = this.props.store;
    return(<div className="page-home">
      <SearchBar placeholder="Search" maxLength={8} />
      <div className="test">
        <p>{title}</p>
        <img src="http://image.chijiayd.com/group1/M00/08/2B/rBJ8J1t7j6qAZNBGAAHJ5IKx6oM467.jpg" alt="" />
      </div>
    </div>)
  }
}

export default Home;